Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Cross): [IOAPPX-213] Remove pivotal from danger and changelog scripts #5422

Merged
merged 13 commits into from
Jan 31, 2024

Conversation

LazyAfternoons
Copy link
Contributor

@LazyAfternoons LazyAfternoons commented Jan 22, 2024

Short description

This PR addresses the removal of Pivotal Tracker integration from our danger and changelog scripts, as it has been replaced by Jira.

List of changes proposed in this pull request

  • Removes danger-plugin-digitalcitizenship and pivotaljs, with the former being a plugin with custom rules over Danger;
  • Removes any dead code related to cross-linking with Pivotal Tracker stories based on the PR title;
  • Removes assigning scope based on ticket labels, given that they have remained unused since the transition to Jira while keeping the association between the project ID and a scope;
  • Removes a generalization layer created to manage both Jira and Pivotal tickets, making the scripts more coincise;
  • Removes old scopes from inactive Jira boards while adding a scope for the IOAPPX board;
  • Refactors file and folders structure to make them coherent with the declared functions and utilities;

How to test

Static checks and tests. I also made a few tests by editing this PR title and running Danger to check its behavior, as you can tell by this messages history.
The changelog can be generated locally by testing any release command or the script directly.

@pagopa-github-bot pagopa-github-bot changed the title [IACROSS-213] Remove pivotal chore: [IACROSS-213] Remove pivotal Jan 22, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Jan 22, 2024

Affected stories

  • ⚙️ IOAPPX-213: Rimozione di pivotal dallo script danger e changelog
    subtask of

Generated by 🚫 dangerJS against 0e6a47b

@LazyAfternoons LazyAfternoons changed the title chore: [IACROSS-213] Remove pivotal chore: [IACROSS-213] Remove pivotal from danger and changelog scripts Jan 22, 2024
Copy link

codecov bot commented Jan 22, 2024

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (535e797) 48.20% compared to head (208ec2e) 47.29%.

❗ Current head 208ec2e differs from pull request most recent head 0e6a47b. Consider uploading reports for the commit 0e6a47b to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5422      +/-   ##
==========================================
- Coverage   48.20%   47.29%   -0.91%     
==========================================
  Files        1417     1460      +43     
  Lines       30539    31314     +775     
  Branches     7503     7606     +103     
==========================================
+ Hits        14722    14811      +89     
- Misses      15749    16445     +696     
+ Partials       68       58      -10     
Files Coverage Δ
scripts/ts/danger/updatePrTitle.tsx 54.68% <54.68%> (ø)

... and 69 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 535e797...0e6a47b. Read the comment docs.

@LazyAfternoons LazyAfternoons added the 💀 Dead matter Graphic assets or chunks of code that are no longer referenced or needed label Jan 26, 2024
@LazyAfternoons LazyAfternoons changed the title chore: [IACROSS-213] Remove pivotal from danger and changelog scripts chore: [IACROSS-225] Remove pivotal from danger and changelog scripts Jan 26, 2024
@LazyAfternoons LazyAfternoons changed the title chore: [IACROSS-225] Remove pivotal from danger and changelog scripts chore: [IACROSS-213] Remove pivotal from danger and changelog scripts Jan 26, 2024
@pagopa-github-bot pagopa-github-bot changed the title chore: [IACROSS-213] Remove pivotal from danger and changelog scripts fix: [IACROSS-213] Remove pivotal from danger and changelog scripts Jan 26, 2024
@pagopa-github-bot pagopa-github-bot changed the title fix: [IACROSS-213] Remove pivotal from danger and changelog scripts feat: [IACROSS-213] Remove pivotal from danger and changelog scripts Jan 26, 2024
@pagopa-github-bot pagopa-github-bot changed the title feat: [IACROSS-213] Remove pivotal from danger and changelog scripts chore: [IACROSS-213] Remove pivotal from danger and changelog scripts Jan 26, 2024
@pagopa-github-bot pagopa-github-bot changed the title chore: [IACROSS-213] Remove pivotal from danger and changelog scripts chore(Cross): [IACROSS-213] Remove pivotal from danger and changelog scripts Jan 27, 2024
@LazyAfternoons LazyAfternoons changed the title chore(Cross): [IACROSS-213] Remove pivotal from danger and changelog scripts chore(Cross): [IOAPPX-213] Remove pivotal from danger and changelog scripts Jan 27, 2024
@LazyAfternoons LazyAfternoons changed the title chore(Cross): [IOAPPX-213] Remove pivotal from danger and changelog scripts [IOAPPX-213] Remove pivotal from danger and changelog scripts Jan 27, 2024
@pagopa-github-bot pagopa-github-bot changed the title [IOAPPX-213] Remove pivotal from danger and changelog scripts chore(Cross): [IOAPPX-213] Remove pivotal from danger and changelog scripts Jan 27, 2024
@LazyAfternoons LazyAfternoons marked this pull request as ready for review January 29, 2024 16:18
@LazyAfternoons LazyAfternoons requested a review from a team as a code owner January 29, 2024 16:18
Copy link
Contributor

@CrisTofani CrisTofani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@hevelius hevelius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LazyAfternoons LazyAfternoons merged commit 8cd556b into master Jan 31, 2024
6 checks passed
@LazyAfternoons LazyAfternoons deleted the IACROSS-213-remove-pivotal branch January 31, 2024 16:14
LazyAfternoons added a commit that referenced this pull request Apr 11, 2024
## Short description
This PR fixes a regression introduced by [this
PR](#5422) which prevents danger
from displaying the proper message for PR without ticket numbers
([example](#5296 (comment)))
or wrong ticket numbers
([example](#4384 (comment))).
Please notice that the whole script might be simplified drastically,
thus we could refactor it in the future but the scope of these PRs is to
remove the support for `pivotal`.

## List of changes proposed in this pull request
- Implements a check to verify if the result of `getJiraIdFromPrTitle`
returns an empty array. If so, it is now explicitly returned, and
subsequently utilized in `commentPrWithTicketsInfo` to send the
appropriate message;
- If a ticket number is detected in the PR title, `getTicketsFromTitle`
now directly returns the result of `getJiraTickets`. This adjustment
aligns with the approach previously utilized
[here](https://github.com/pagopa/io-app/pull/2935/files#diff-8ec5aa024b8a7cf5ead4ccf7f60297c3cdca64e13a74216867bc74914829a435R44),
beside the mapping to a generic ticket type which is not needed anymore.

## How to test
Static checks but you can also check the history of the
`pagopa-github-bot` message. As you can see I tested this without a
ticket number, with a wrong ticket number, with multiple ticket numbers
and also with the actual ticket number.

---------

Co-authored-by: Cristiano Tofani <[email protected]>
Co-authored-by: Fabio Bombardi <[email protected]>
CrisTofani added a commit that referenced this pull request Apr 12, 2024
## Short description
This PR fixes a regression introduced by [this
PR](#5422) which prevents danger
from displaying the proper message for PR without ticket numbers
([example](#5296 (comment)))
or wrong ticket numbers
([example](#4384 (comment))).
Please notice that the whole script might be simplified drastically,
thus we could refactor it in the future but the scope of these PRs is to
remove the support for `pivotal`.

## List of changes proposed in this pull request
- Implements a check to verify if the result of `getJiraIdFromPrTitle`
returns an empty array. If so, it is now explicitly returned, and
subsequently utilized in `commentPrWithTicketsInfo` to send the
appropriate message;
- If a ticket number is detected in the PR title, `getTicketsFromTitle`
now directly returns the result of `getJiraTickets`. This adjustment
aligns with the approach previously utilized
[here](https://github.com/pagopa/io-app/pull/2935/files#diff-8ec5aa024b8a7cf5ead4ccf7f60297c3cdca64e13a74216867bc74914829a435R44),
beside the mapping to a generic ticket type which is not needed anymore.

## How to test
Static checks but you can also check the history of the
`pagopa-github-bot` message. As you can see I tested this without a
ticket number, with a wrong ticket number, with multiple ticket numbers
and also with the actual ticket number.

---------

Co-authored-by: Cristiano Tofani <[email protected]>
Co-authored-by: Fabio Bombardi <[email protected]>
CrisTofani added a commit that referenced this pull request Apr 12, 2024
## Short description
This PR fixes a regression introduced by [this
PR](#5422) which prevents danger
from displaying the proper message for PR without ticket numbers
([example](#5296 (comment)))
or wrong ticket numbers
([example](#4384 (comment))).
Please notice that the whole script might be simplified drastically,
thus we could refactor it in the future but the scope of these PRs is to
remove the support for `pivotal`.

## List of changes proposed in this pull request
- Implements a check to verify if the result of `getJiraIdFromPrTitle`
returns an empty array. If so, it is now explicitly returned, and
subsequently utilized in `commentPrWithTicketsInfo` to send the
appropriate message;
- If a ticket number is detected in the PR title, `getTicketsFromTitle`
now directly returns the result of `getJiraTickets`. This adjustment
aligns with the approach previously utilized
[here](https://github.com/pagopa/io-app/pull/2935/files#diff-8ec5aa024b8a7cf5ead4ccf7f60297c3cdca64e13a74216867bc74914829a435R44),
beside the mapping to a generic ticket type which is not needed anymore.

## How to test
Static checks but you can also check the history of the
`pagopa-github-bot` message. As you can see I tested this without a
ticket number, with a wrong ticket number, with multiple ticket numbers
and also with the actual ticket number.

---------

Co-authored-by: Cristiano Tofani <[email protected]>
Co-authored-by: Fabio Bombardi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cross 💀 Dead matter Graphic assets or chunks of code that are no longer referenced or needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants